<!DOCTYPE html>
<html>

<head>

    <title>Digital</title>
    <script>

    </script>

</head>



<body>
    <!-- <script>
        window.onload = function() {
            
        }
        document.getElementsByTagName("button1").onclick = function() {};
        function handleResponse(){};
        request.onreadystatechange = handleResponse;
    </script> -->

    <script>
        function onLoad(f) {
            if (onLoad.loaded) {
                console.log("onLoad.loaded 存在");
                window.setTimeout(f, 0);
            } else if (window.addEventListener) {
                console.log("onLoad.loaded 存在");
                window.addEventListener("load", f, false);
            } else if (window.attachEvent) {
                console.log("onLoad.loaded 存在");
                window.attachEvent("onload")
            }
        }
        // 给Onload设置一个标志，用来指定文档是否载入完成
        onLoad.loaded = false;
        // 注册一个函数，当文档载入完成时设置这个标志
        onLoad(function(){ onLoad.loaded = true});
    </script>


</body>

</html>